package com.xdtech.core.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@MappedSuperclass
public abstract class BaseModel {
	
	/**
	 * 记录创建时间不允许修改
	 */
	@Column(name="CREATE_TIME",updatable=false)
	@Temporal(TemporalType.TIMESTAMP)
	protected Date createTime = new Date();
	
	@Column(name="UPDATE_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	protected Date updateTime = new Date();
	@Column(name="CREATOR_ID")
	protected Long creatorId;
	@Column(name="CREATOR_CODE")
	protected Long creatorCode;
	@Column(name="CREATOR_NAME")
	protected Long creatorName;
	
	
	public BaseModel() {
		super();
		this.createTime = new Date();
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Long getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(Long creatorId) {
		this.creatorId = creatorId;
	}

	public Long getCreatorCode() {
		return creatorCode;
	}

	public void setCreatorCode(Long creatorCode) {
		this.creatorCode = creatorCode;
	}

	public Long getCreatorName() {
		return creatorName;
	}

	public void setCreatorName(Long creatorName) {
		this.creatorName = creatorName;
	}

	

}
